package ee.ts022.tuum.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name="cst_address")
public class CstAddress {
	
	@Id
	@Column(name="cst_address")
	@SequenceGenerator(name="pk_sequence",sequenceName="s_cst_address")
	@GeneratedValue(strategy=GenerationType.AUTO, generator="pk_sequence" )
	private int cstAddress;
	
	@OneToOne
    @JoinColumn(name="customer")
	private Customer customer;
	
	@Column(name="zip")
	private String zip;
	
	@Column(name="house")
	private String house;
	
	@Column(name="address")
	private String address;
	
	@Column(name="country")
	private String country;
	
	@Column(name="town_county")
	private String townCounty;
	
	@Column(name="address_type")
	private Integer addressType;

	public int getCstAddress() {
		return cstAddress;
	}

	public void setCstAddress(int cstAddress) {
		this.cstAddress = cstAddress;
	}

	public Customer getCustomer() {
		return customer;
	}

	public void setCustomer(Customer customer) {
		this.customer = customer;
	}

	public String getZip() {
		return zip;
	}

	public void setZip(String zip) {
		this.zip = zip;
	}

	public String getHouse() {
		return house;
	}

	public void setHouse(String house) {
		this.house = house;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public String getTownCounty() {
		return townCounty;
	}

	public void setTownCounty(String townCounty) {
		this.townCounty = townCounty;
	}

	public Integer getAddressType() {
		return addressType;
	}

	public void setAddressType(Integer addressType) {
		this.addressType = addressType;
	}
}
